package com.fzg.controller;


import com.fzg.common.enums.ResponseWrapper;
import com.fzg.service.ChinaProvinceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 中国的所有省份 前端控制器
 * </p>
 *
 * @author fzg
 * @since 2022-11-18
 */
@RestController
@RequestMapping("/china-province")
public class ChinaProvinceController {

    @Autowired
    private ChinaProvinceService chinaProvinceService;

    @GetMapping("/importProvinceDataToMySQL")
    public ResponseWrapper importProvinceDataToMySQL(){
        return ResponseWrapper.markSuccess(chinaProvinceService.importProvinceDataToMySQL());
    }

}
